package sut;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.ServerSocket;
import java.sql.SQLException;
import java.util.Enumeration;
import java.util.Properties;

public class Lanzadora {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {		
		String text1="Hola", text2="caracola", text3="Hasta luegorrr";
		
		String fileName="/Users/Maco/Desktop/pruebasSeg/caracola.txt";
		try {
			FileOutputStream fos=new FileOutputStream(fileName);
			fos.write(text1.getBytes());
			fos.write(text2.getBytes());
			//fos.write(text3.getBytes());
			fos.close();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
//		
//		fileName="/Users/Maco/Desktop/pruebasSeg/caracola1.txt";
//		try {
//			FileOutputStream fos=new FileOutputStream(fileName);
//			fos.write(text1.getBytes(), 0, text1.length());
//			fos.close();
//		} catch (Exception e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}	
		
		FileInputStream fi=new FileInputStream("/Users/Maco/Desktop/pruebasSeg/caracola.txt");
		byte[] b=new byte[fi.available()];
		int x=fi.read();
		fi.close();
		System.out.println(new String(b));
	}

}
